#ifndef POINT
#define POINT

#include <iostream>

struct point_t
{
    point_t();
    point_t(double x, double y);
    point_t & operator+=(point_t const & right);
    point_t & operator-=(point_t const & right);
    point_t & operator*=(double num);
    point_t & operator/=(double num);
    double x;
    double y;
};

bool operator==(point_t const & left, point_t const & right);
bool operator!=(point_t const & left, point_t const & right);
point_t operator+(point_t right, point_t const & left);
point_t operator-(point_t right, point_t const & left);
point_t operator*(point_t point, double num);
point_t operator*(double num, point_t point);
point_t operator/(point_t point, double num);

double distance(point_t const & a, point_t const & b);

enum point_pos
{
    LEFT,
    RIGHT,
    ON,
    UNDEFINED
};


std::ostream & operator<<(std::ostream & out, point_t const & point);
std::istream & operator>>(std::istream & in, point_t & point);

#endif
